﻿<Window x:Class="HandsFree.GUI.StatusIndicator" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Status" Height="70" Width="70" WindowStyle="None"
		ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent" Topmost="True" UseLayoutRounding="True"
		WindowStartupLocation="Manual" Left="10" Top="10">
	<Window.Resources>
		<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
	</Window.Resources>
	<Grid>
		<Button x:Name="indicator" Margin="11" PreviewMouseDown="indicator_PreviewMouseDown"
				PreviewMouseMove="indicator_PreviewMouseMove" PreviewMouseUp="indicator_PreviewMouseUp"
				Click="indicator_Click" FocusVisualStyle="{x:Null}">
			<Button.Background>
				<SolidColorBrush Color="#FF00AAC5" />
			</Button.Background>
			<Button.Foreground>
				<SolidColorBrush Color="#FFF" />
			</Button.Foreground>
			<Button.Effect>
				<DropShadowEffect ShadowDepth="0" BlurRadius="10" />
			</Button.Effect>
			<TextBlock x:Name="status" HorizontalAlignment="Center" VerticalAlignment="Center" Text="&#xf131;"
					FontFamily="./Fonts/#FontAwesome" FontSize="24" />
			<Button.Template>
				<ControlTemplate TargetType="Button">
					<Border x:Name="border" CornerRadius="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"
							Background="{TemplateBinding Background}">
						<ContentPresenter />
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Background" TargetName="border" Value="#FF49CDE2" />
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter Property="Background" TargetName="border" Value="#FF1391A4" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Button.Template>
		</Button>
		<Button HorizontalAlignment="Right" VerticalAlignment="Top" Width="20" Height="20" Margin="0,11,6,0"
				Cursor="Hand" FocusVisualStyle="{x:Null}"
				Visibility="{Binding IsMouseOver, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
				Click="closeButton_Click">
			<Button.Effect>
				<DropShadowEffect ShadowDepth="0" BlurRadius="10" />
			</Button.Effect>
			<Button.Template>
				<ControlTemplate TargetType="Button">
					<Border x:Name="border" CornerRadius="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"
							Background="#444">
						<Path x:Name="path" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="#FFF"
								StrokeThickness="1" Data="M 0 0 6 6 M 0 6 6 0" />
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Background" TargetName="border" Value="#666" />
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter Property="Background" TargetName="border" Value="#AAA" />
							<Setter Property="Stroke" TargetName="path" Value="#444" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Button.Template>
		</Button>
	</Grid>
</Window>
